import React, { Component } from 'react';


class List extends Component {
    // constructor(props) {
    //     super(props);
    // }
    state = {

        list : [
            {id: 1,name: 'luser',},
            {id: 2,name: 'play'},
            {id: 3,name: 'game'}
        ],
    }
    setState = {}
    render() { 
        return ( 
            <div>
                <p>列表渲染</p>
                <ul>
                    {
                        this.state.list.map(item => 
                            <li key={item.id}>{item.name}</li>
                        )
                    }
                </ul>
            </div>
        );
    }
}

export default List;